//
//  SEDoctorDetailReserveServiceItemCell.swift
//  SmartEyeForPatient
//
//  Created by QDSG on 2021/4/13.
//

import UIKit

class SEDoctorDetailReserveServiceItemCell: UICollectionViewCell {

    weak var dateViewDelegate: SERegistrationDoctorDateViewDelegate?

    override func awakeFromNib() {
        super.awakeFromNib()
        backgroundColor = .white
        contentView.backgroundColor = .white
    }

    func updateData(_ model: SERegistrationDoctorShift, indexPath: IndexPath) {
        dateView.updateView(model: model)
    }
    
    @IBOutlet private weak var dateView: SERegistrationDoctorDateView!{
        didSet {
            dateView.delegate = self
        }
    }
}

extension SEDoctorDetailReserveServiceItemCell: SERegistrationDoctorDateViewDelegate {
    func registrationDoctorDateViewBtnAction(model: SERegistrationDoctorShift) {
        dateViewDelegate?.registrationDoctorDateViewBtnAction(model: model)
    }
}
